#include "CMainWindow.h"
#include <qbitmap.h>

CMainWindow::CMainWindow(QWidget *parent)
	: QWidget(parent)
{
	ui.setupUi(this);
    OnInitDialog();
}

CMainWindow::~CMainWindow()
{
}

void CMainWindow::OnInitDialog()
{
    setWindowFlags(Qt::FramelessWindowHint | Qt::CustomizeWindowHint);
    auto _ret = m_pixmap.load(":/testSpecialShape/resource/bg.png");
    resize(m_pixmap.size());
#if 1
    setAttribute(Qt::WA_TranslucentBackground);
    setStyleSheet("image:url(:/testSpecialShape/resource/bg.png)");
#else
    setAutoFillBackground(true);
    setMask(m_pixmap.mask());
#endif // 0
}
